﻿using System.Linq.Expressions;
using Basic.HrModel.DB;
using Basic.HrModel.EmpPost;

namespace Basic.HrCollect
{
    public interface IEmpPostCollect
    {
        long Add ( EmpPostAddDto add );

        bool CheckIsExists ( long empId, long comId );

        void Clear ( long empId );

        void Delete ( DBEmpPost obj );

        DBEmpPost Get ( long id );
        T Get<T> ( long id ) where T : class;

        Dictionary<long, string[]> GetEmpDeptPost ( long[] empId, long deptId );

        Result[] GetEmpDeptPost<Result> ( long empId, long deptId, Expression<Func<DBEmpPost, Result>> selector );

        Result[] GetEmpDeptPost<Result> ( long[] empId, long[] deptId, Expression<Func<DBEmpPost, Result>> selector );

        Dictionary<long, string[]> GetEmpPost ( KeyValuePair<long, long>[] empAndDept );

        EmpPostDto[] GetEmpPost ( long[] empId, long companyId );

        Result[] GetEmpPost<Result> ( long empId ) where Result : class, new();

        Result[] GetEmpPost<Result> ( long empId, long[] companyId ) where Result : class, new();

        Result[] GetEmpPost<Result> ( long empId, long companyId ) where Result : class, new();

        string[] GetPost ( long empId, long deptId );
    }
}